home *** CD-ROM | disk | FTP | other *** search
/ Champak 40 / Vol 40.iso / games / super_su.swf / scripts / DefineSprite_234 / frame_1 / DoAction.as
Encoding:
Text File  |  2007-04-19  |  883 b   |  36 lines

  1. function mSelectColor(aintindex)
  2. {
  3.    if(aintindex < this.arrColors.length && aintindex >= 0)
  4.    {
  5.       this.oColor = new Color(this.oColorDisplay);
  6.       this.oColor.setRGB(this.arrColors[aintindex]);
  7.       this.hexColor = this.arrColors[aintindex];
  8.    }
  9. }
  10. function mSelectUp()
  11. {
  12.    this.intIndex--;
  13.    if(this.intIndex < 0)
  14.    {
  15.       this.intIndex = 0;
  16.    }
  17.    this.mSelectColor(this.intIndex);
  18. }
  19. function mSelectDown()
  20. {
  21.    this.intIndex = this.intIndex + 1;
  22.    if(this.intIndex >= this.arrColors.length)
  23.    {
  24.       this.intIndex = this.arrColors.length - 1;
  25.    }
  26.    this.mSelectColor(this.intIndex);
  27. }
  28. this.arrColors = new Array();
  29. this.arrColors.push(3778254);
  30. this.arrColors.push(4766150);
  31. this.arrColors.push(15991129);
  32. this.arrColors.push(5878308);
  33. this.arrColors.push(6710886);
  34. this.arrColors.push(16750848);
  35. this.arrColors.push(39423);
  36.